﻿/****************************** Module Header ******************************\
 * Module Name:  tProductStorage.cs
 * Module Version:  1.0.0 (2013-01-25)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;

namespace UCL.Data.ORM.UMD
{
    /// <summary>
    /// 商品库存记录表(进出库明细表) 数据实体类
    /// </summary>
    [DBTable(Common = "商品库存记录表(进出库明细表)")]
    public class tProductStorage
    {
        /// <summary>
        /// Guid编号
        /// </summary>
        public Guid ID { get { return _ID ?? default(Guid); } set { _ID = value; } }

        [DBColumn(Alias = "ID", IsKey = true, DefaultValue = "newid()")]
        private Guid? _ID;

        /// <summary>
        /// 商品Guid编号
        /// </summary>
        public Guid ProductID { get { return _ProductID ?? default(Guid); } set { _ProductID = value; } }

        [DBColumn(Alias = "商品Guid编号")]
        private Guid? _ProductID;

        /// <summary>
        /// 商品条码(关联商品库字段)
        /// </summary>
        public string ProductBarcode { get { return _ProductBarcode; } set { _ProductBarcode = value; } }

        [DBColumn(Alias = "商品条码", Common = "关联商品库字段", CanBeNull = true, Length = "32")]
        private string _ProductBarcode;

        /// <summary>
        /// 商品类别编号
        /// </summary>
        public Guid ProductCatalogID { get { return _ProductCatalogID ?? default(Guid); } set { _ProductCatalogID = value; } }

        [DBColumn(Alias = "商品类别编号", CanBeNull = true)]
        private Guid? _ProductCatalogID;

        /// <summary>
        /// 是否是仓库商品
        /// </summary>
        public bool IsStorage { get { return _IsStorage ?? default(bool); } set { _IsStorage = value; } }

        [DBColumn(Alias = "是否是仓库商品", CanBeNull = true)]
        private bool? _IsStorage;

        /// <summary>
        /// 订单Guid编号
        /// </summary>
        public Guid OrderID { get { return _OrderID ?? default(Guid); } set { _OrderID = value; } }

        [DBColumn(Alias = "订单Guid编号", CanBeNull = true)]
        private Guid? _OrderID;

        /// <summary>
        /// 商品单位Guid编号
        /// </summary>
        public Guid ProductUnitID { get { return _ProductUnitID ?? default(Guid); } set { _ProductUnitID = value; } }

        [DBColumn(Alias = "商品单位Guid编号", CanBeNull = true)]
        private Guid? _ProductUnitID;

        /// <summary>
        /// 出入库数量
        /// </summary>
        public double Quantity { get { return _Quantity ?? default(double); } set { _Quantity = value; } }

        [DBColumn(Alias = "出入库数量")]
        private double? _Quantity;

        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal Price { get { return _Price ?? default(decimal); } set { _Price = value; } }

        [DBColumn(Alias = "商品价格", CanBeNull = true)]
        private decimal? _Price;

        /// <summary>
        /// 成交金额
        /// </summary>
        public decimal TotalAmount { get { return _TotalAmount ?? default(decimal); } set { _TotalAmount = value; } }

        [DBColumn(Alias = "/// 成交金额", CanBeNull = true)]
        private decimal? _TotalAmount;

        /// <summary>
        /// 当前库存
        /// </summary>
        public double Stock { get { return _Stock ?? default(double); } set { _Stock = value; } }

        [DBColumn(Alias = "当前库存")]
        private double? _Stock;

        /// <summary>
        /// 商品进出类型(入仓、出仓)
        /// </summary>
        public string InOrOut { get { return _InOrOut; } set { _InOrOut = value; } }

        [DBColumn(Alias = "商品进出类型", Common = "入仓、出仓", CanBeNull = true, Length = "8")]
        private string _InOrOut;

        /// <summary>
        /// 优惠折扣率
        /// </summary>
        public short DiscountRate { get { return _DiscountRate ?? default(short); } set { _DiscountRate = value; } }

        [DBColumn(Alias = "Discount", DefaultValue = "100")]
        private short? _DiscountRate;

        /// <summary>
        /// 备注说明
        /// </summary>
        public string Remark { get { return _Remark; } set { _Remark = value; } }

        [DBColumn(Alias = "备注说明", CanBeNull = true, Length = "255")]
        private string _Remark;

        /// <summary>
        /// 供应商Guid编号
        /// </summary>
        public Guid ProviderID { get { return _ProviderID ?? default(Guid); } set { _ProviderID = value; } }

        [DBColumn(Alias = "供应商Guid编号", CanBeNull = true)]
        private Guid? _ProviderID;

        /// <summary>
        /// 物流公司Guid编号
        /// </summary>
        public Guid LogisticsID { get { return _LogisticsID ?? default(Guid); } set { _LogisticsID = value; } }

        [DBColumn(Alias = "物流公司Guid编号", CanBeNull = true)]
        private Guid? _LogisticsID;

        /// <summary>
        /// 操作类型Guid编号
        /// </summary>
        public Guid OperateID { get { return _OperateID ?? default(Guid); } set { _OperateID = value; } }

        [DBColumn(Alias = "操作类型Guid编号", CanBeNull = true)]
        private Guid? _OperateID;

        /// <summary>
        /// 用户帐号
        /// </summary>
        public string UserName { get { return _UserName; } set { _UserName = value; } }

        [DBColumn(Alias = "用户帐号", Length = "32")]
        private string _UserName;

        /// <summary>
        /// 管理员帐号
        /// </summary>
        public string AdminName { get { return _AdminName; } set { _AdminName = value; } }

        [DBColumn(Alias = "管理员帐号", CanBeNull = true, Length = "32")]
        private string _AdminName;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get { return _CreatedTime ?? default(DateTime); } set { _CreatedTime = value; } }

        [DBColumn(Alias = "创建时间", DefaultValue = "getdate()")]
        private DateTime? _CreatedTime;

        /// <summary>
        /// 部门Guid编号
        /// </summary>
        public Guid DepartmentID { get { return _DepartmentID ?? default(Guid); } set { _DepartmentID = value; } }

        [DBColumn(Alias = "部门Guid编号", CanBeNull = true)]
        private Guid? _DepartmentID;

    }
}
